package com.qf.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.sql.Date;
import java.sql.Timestamp;

@TableName("patient")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class PatientPojo {
    @TableId(value = "patient_id")
    private String patientId;

    @TableField(value = "user_id")
    private Integer userId;

    @TableField(value = "patient_name")
    private String patientName;

    @TableField(value = "patient_sex")
    private String patientSex;

    @TableField(value = "patient_age")
    private Integer patientAge;

    @TableField(value = "patient_tel")
    private String patientTel;

    @TableField(value = "patient_status")
    private Integer patientStatus;

    @TableField(value = "patient_date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp patientDate;

    @TableField(value = "patient_remark")
    private String patientRemark;

    @TableField(value = "patient_items")
    private String patientItems;

    @TableField(value = "patient_card")
    private String patientCard;

    @TableField(value = "is_delete")
    private Integer isDelete;

    @TableField(exist = false)
    private UserPojo user;
}
